﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Electric.Entity.Commons
{
    /// <summary>
    /// 父类
    /// </summary>
    public class EleEntity
    {
        /// <summary>
        /// Id DatabaseGenerated(DatabaseGeneratedOption.Identity)，指定为自动增长。
        /// </summary>
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long Id { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        [Comment("创建者Id")]
        public long CreatorId { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Comment("创建时间")]
        public DateTime? CreationTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 最后编辑时间
        /// </summary>
        [Comment("最后编辑时间")]
        public virtual DateTime? LastModificationTime { get; set; }
    }
}